package d16_extends_constructor01;

public class Teacher extends People {
    private String skill;

    //如果创建了,带参构造就不会踢狗无参构造
    public Teacher() {

    }

    //那么现在该如何对继承机父类的数据进行初始化呢
    public Teacher(String name, int age, String skill) {
        super(name, age);//如果不写,它会默认调用父类的无参构造super(),因此通过带参构造传进来的值name与age就无法接收到
        this.skill = skill;
    }


    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }
}
